<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>用户列表</title>
</head>
<body>
    <a th:href="@{/user/add}">添加员工</a> <br>
    <form th:action="@{/user/selectLike}">
        <label>名字:</label>
        <input type="text"  name="name" placeholder="请输入你要查找的内容!">
        <label>地址:</label>
        <input type="text"  name="address" placeholder="请输入你要查找的内容!">
        <input type="submit">
    </form>
    <table>
        <thead>
        <tr>
            <th>id</th>
            <th>姓名</th>
            <th>性别</th>
            <th>密码</th>
            <th>年龄</th>
            <th>邮箱</th>
            <th>地址</th>
            <th>电话</th>
            <th>创建日期</th>
            <th>更新日期</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <tr th:each="user:${users}">
            <td th:text="${user.getId()}"></td>
            <td th:text="${user.getName()}"></td>
            <td th:text="${user.getGender()}"></td>
            <td th:text="${user.getPassword()}"></td>
            <td th:text="${user.getAge()}"></td>
            <td th:text="${user.getEmail()}"></td>
            <td th:text="${user.getAddress()}"></td>
            <td th:text="${user.getPhone()}"></td>
<!--            <td th:text="${user.getGmtCreate(),'yyyy-MM-dd HH:mm:ss'}"></td>-->
            <td th:text="${#dates.format(user.getGmtCreate(),'yyyy-MM-dd HH:mm:ss')}"></td>
            <td th:text="${#dates.format(user.getGmtModified(),'yyyy-MM-dd HH:mm:ss')}"></td>
<!--            <td th:text="${#dates.format(emp.getBirth(),'yyyy-MM-dd HH:mm:ss')}"></td>-->
            <td>
                <a th:href="@{/user/update/}+${user.getId()}">编辑</a>
                <a th:href="@{/user/delete/}+${user.getId()}">删除</a>
            </td>
        </tr>
        </tbody>
    </table>
</body>
</html>